<?php require('conexion.php'); 
	  $nc=$_REQUEST['nc'];
	  $consulta="select * from alumnos where ncontrol='".$nc."'";
	  $recordset=mysql_query($consulta);
	  $row=mysql_fetch_array($recordset);
      $nombre=$row["nombre"];
	  $edad=$row["edad"];
	  $sexo=$row["sexo"];
	  $direccion=$row["direccion"];
	  $telefono=$row["telefono"];
	  $email=$row["email"];

?>
<!--Declaracion del tipo de documento como HTML5-->
<!DOCTYPE html>
<html> 
<head> 
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>jQuery Mobile: Demos and Documentation</title>
	<link rel="stylesheet"  href="css/themes/default/jquery.mobile-1.2.1.css" />
	<link rel="stylesheet" href="docs/_assets/css/jqm-docs.css" />
	<script src="js/jquery.js"></script>
	<script src="docs/_assets/js/jqm-docs.js"></script>
	<script src="js/jquery.mobile-1.2.1.js"></script>
</head> 
<body> 
	<div data-role="page"> 
	<div data-role="header">
		<a href="index.php" data-role="button" data-icon="home" data-iconpos="notext" data-theme="b" data-iconpos="left" data-inline="true">Inicio</a>
		<a href="#" data-role="button" data-icon="bars" data-iconpos="notext" data-theme="b" data-iconpos="right" data-inline="true">Menú</a>		
	</div>	
	<div data-role="content">
		 <form name="formreg" action="consultas.php" method="POST">
		  <input type="hidden" name="nc" value="<?php echo $nc;?>" />	   
          <label for="basic"/>Nombre:</label>
          <input type="text" name="nombre" id="basic" value="<?php echo $nombre;?>" required />
    	  <label for="slider-fill"/>Edad:</label>
    	  <input type="range" name="edad" id="slider-fill" value="<?php echo $edad;?>" min="0" max="60" data-highlight="true" />
    	  <label for="sexo" class="select"/>Sexo:</label/>
          <select name="sexo" id="sexo"/>
			 <option value="<?php echo $sexo; ?>"/><?php echo $sexo; ?></option/>	  
             <option value="H"/>H</option/>
             <option value="M"/>M</option/>      
          </select/>
    	  <label for="basic"/>Direccion:</label>
          <input type="text" name="direccion" id="basic" value="<?php echo $direccion;?>" required />
    	   <label for="basic"/>Telefono:</label>
          <input type="tel" name="telefono" id="basic" value="<?php echo $telefono;?>" required />
    	   <label for="basic"/>E-mail:</label>
          <input type="email"  name="email" id="basic" value="<?php echo $email;?>" required />
		  <input type="submit" name="envio" value="Actualizar" />
		  <input type="hidden" name="fn" value="2" />
		 </form>
		  <form name="eliminar" action="consultas.php" method="POST">
		  <input type="hidden" name="nc" value="<?php echo $nc;?>" />
		  <input type="submit" name="envio" value="Eliminar" />
		  <input type="hidden" name="fn" value="3" />
		 </form>  
	</div> 
	<div data-role="footer">
	</div>
</div>
</body>
</html>